package com.eye.catcher.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author huzhiwei
 * @since 2022-02-10
 */
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TLogDaAbnormal extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * 登录名
     */
    @TableField("LOGIN_NAME")
    private String loginName;

    /**
     * 中文名
     */
    @TableField("USER_NAME")
    private String userName;

    /**
     * 模块编码
     */
    @TableField("MODULE_CODE")
    private String moduleCode;

    /**
     * 模块名
     */
    @TableField("MODULE_NAME")
    private String moduleName;

    /**
     * 微服务系统编码
     */
    @TableField("SYSTEM_CODE")
    private String systemCode;

    /**
     * 系统名称
     */
    @TableField("SYSTEM_NAME")
    private String systemName;

    /**
     * 方法编码
     */
    @TableField("METHOD_CODE")
    private String methodCode;

    /**
     * 方法名
     */
    @TableField("METHOD_NAME")
    private String methodName;

    /**
     * 操作编码
     */
    @TableField("OPERATION_CODE")
    private String operationCode;

    /**
     * 操作名
     */
    @TableField("OPERATION_NAME")
    private String operationName;

    /**
     * 参数
     */
    @TableField("PARAM")
    private String param;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("TIME")
    private LocalDateTime time;

    @TableField("USER_ID")
    private String userId;

    @TableField("ORG_ID")
    private String orgId;

    @TableField("ORG_NAME")
    private String orgName;

    @TableField("RUN_STATE")
    private String runState;

    @TableField("RETURN_TEXT")
    private String returnText;


    public TLogDaAbnormal() {
    }

    public TLogDaAbnormal(Integer id, String loginName, String userName, String moduleCode, String moduleName, String systemCode, String systemName, String methodCode, String methodName, String operationCode, String operationName, String param, String remark, LocalDateTime time, String userId, String orgId, String orgName, String runState, String returnText) {
        this.id = id;
        this.loginName = loginName;
        this.userName = userName;
        this.moduleCode = moduleCode;
        this.moduleName = moduleName;
        this.systemCode = systemCode;
        this.systemName = systemName;
        this.methodCode = methodCode;
        this.methodName = methodName;
        this.operationCode = operationCode;
        this.operationName = operationName;
        this.param = param;
        this.remark = remark;
        this.time = time;
        this.userId = userId;
        this.orgId = orgId;
        this.orgName = orgName;
        this.runState = runState;
        this.returnText = returnText;
    }
}
